#include"MutationSwap.h"
#include"RandomGenerator.h"
#include"Evaluation.h"

using namespace std;

void MutationSwap::Mutate(Solution& solution)
{
	RandomGen<int> random(0 , Evaluation::GetJobNum() - 1);
	while(true)
	{
		int firstIndex = random();
		int secondIndex = random();
		if(firstIndex != secondIndex)
		{
			swap(solution[firstIndex] , solution[secondIndex]);
			break;
		}
	}
}